import request from '@/utils/request'

// 获取年度预算列表
export function getYearBudgetApplayPage(params: any) {
  return request({
    url: '/project/year/budget-apply/page',
    method: 'get',
    params,
  })
}

// 创建年度预算
export function saveYearBudgetApplayCreate(params: any) {
  return request({
    url: '/project/year/budget-apply/create',
    method: 'post',
    data: params,
  })
}

// 获得年度预算详细信息
export function getYearBudgetApplayDetails(params: any) {
  return request({
    url: '/project/year/budget-apply/get',
    method: 'get',
    params,
  })
}

// 更新年度预算上报
export function saveYearBudgetApplayUpdate(params: any) {
  return request({
    url: '/project/year/budget-apply/update',
    method: 'PUT',
    params,
  })
}

// 更新年度预算审定金额
export function putYearBudgetApplayUpdate(data: any) {
  return request({
    url: '/project/year/budget-apply/updateApproval',
    method: 'PUT',
    data,
  })
}

// 导出年度预算上报 Excel
export function getYearBudgetApplayExport(params: any) {
  return request({
    url: '/project/year/budget-apply/export-excel',
    method: 'get',
    responseType: 'blob',
    params,
  })
}

// 获得项目现场试验经费分页
export function getFieldTestPage(params: any) {
  return request({
    url: '/project/field/experiment-funding/page',
    method: 'get',
    params,
  })
}

// 创建项目现场试验经费
export function saveFieldTestCreate(params: any) {
  return request({
    url: '/project/field/experiment-funding/create',
    method: 'post',
    data: params,
  })
}

// 获得项目现场试验经费详细信息
export function getFieldTestDetails(params: any) {
  return request({
    url: '/project/field/experiment-funding/get',
    method: 'get',
    params,
  })
}

// 导出项目现场试验经费 Excel
export function getFieldTestExport(params: any) {
  return request({
    url: '/project/field/experiment-funding/export-excel',
    method: 'get',
    responseType: 'blob',
    params,
  })
}

// 获得科研工作经费分页
export function getJobsFundingPage(params: any) {
  return request({
    url: '/project/tech/jobs-funding/page',
    method: 'get',
    params,
  })
}

// 获得科研工作经费详细信息
export function getJobsFundingDetails(params: any) {
  return request({
    url: '/project/tech/jobs-funding/get',
    method: 'get',
    params,
  })
}

// 创建科研工作经费
export function saveJobsFundingCreate(params: any) {
  return request({
    url: '/project/tech/jobs-funding/create',
    method: 'post',
    data: params,
  })
}

// 导出科研工作经费 Excel
export function getJobsFundingExport(params: any) {
  return request({
    url: '/project/tech/jobs-funding/export-excel',
    method: 'get',
    responseType: 'blob',
    params,
  })
}

// 获得经费拨款单分页
export function getAppropriationPage(params: any) {
  return request({
    url: '/project/funding/appropriation/page',
    method: 'get',
    params,
  })
}

// 获得经费拨款单详细信息
export function getAppropriationDetails(params: any) {
  return request({
    url: '/project/funding/appropriation/get',
    method: 'get',
    params,
  })
}

// 创建科研工作经费
export function saveAppropriationCreate(params: any) {
  return request({
    url: '/project/funding/appropriation/create',
    method: 'post',
    data: params,
  })
}

// 导出科研工作经费 Excel
export function getAppropriationExport(params: any) {
  return request({
    url: '/project/funding/appropriation/export-excel',
    method: 'get',
    responseType: 'blob',
    params,
  })
}

// 获得项目经费调整分页
export function getFundingAdjustPage(params: any) {
  return request({
    url: '/project/funding-adjust/page',
    method: 'get',
    params,
  })
}

// 获得项目经费调整详细信息
export function getFundingAdjustDetails(params: any) {
  return request({
    url: '/project/funding-adjust/get',
    method: 'get',
    params,
  })
}

// 创建项目经费调整
export function saveFundingAdjustCreate(params: any) {
  return request({
    url: '/project/funding-adjust/create',
    method: 'post',
    data: params,
  })
}

// 导出项目经费调整  Excel
export function getFundingAdjustExport(params: any) {
  return request({
    url: '/project/funding-adjust/export-excel',
    method: 'get',
    responseType: 'blob',
    params,
  })
}

// 获得科技项目经费跨年使用申请上报分页
export function getFundingNextYearPage(params: any) {
  return request({
    url: '/project/funding-next-year/page',
    method: 'get',
    params,
  })
}

// 获得科技项目经费跨年使用申请详细信息
export function getFundingNextYearDetails(params: any) {
  return request({
    url: '/project/funding-next-year/get',
    method: 'get',
    params,
  })
}

// 创建科技项目经费跨年使用申请上报
export function saveFundingNextYearCreate(params: any) {
  return request({
    url: '/project/funding-next-year/create',
    method: 'post',
    data: params,
  })
}

// 导出科技项目经费跨年使用申请上报  Excel
export function getFundingNextYearExport(params: any) {
  return request({
    url: '/project/funding-next-year/export-excel',
    method: 'get',
    responseType: 'blob',
    params,
  })
}

// 根据课题id获得年度预算上报
export function getYearByTopicId(params: any) {
  return request({
    url: '/project/year/budget-apply/getByTopicId',
    method: 'get',
    params,
  })
}
